package com.example.sangong.utils;

import com.example.sangong.entity.Player;
import com.example.sangong.entity.User;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class PlayerUtils {
    public static Player getPlayer(String name,String imagUrl) {
        Player player = new Player();
        User user = new User();
        user.setName(name);
        user.setImgUrl(imagUrl);
        user.setId(UUID.randomUUID().toString());
        player.setUser(user);
        player.setChip(10);
        player.setIsHead(false);
        player.setScore(100);
        return player;
    }

    public static Player getPlayer(String name, String userId,String imagUrl) {
        Player player = new Player();
        User user = new User();
        user.setName(name);
        user.setId(userId);
        user.setImgUrl(imagUrl);
        player.setUser(user);
        player.setChip(10);
        player.setIsHead(false);
        player.setScore(100);
        return player;
    }

    public static List<Player> defaultPlayer() {
        List<Player> playerList = new ArrayList<>();

        playerList.add(PlayerUtils.getPlayer("李四","tx1.jpg"));
        playerList.add(PlayerUtils.getPlayer("张三", "11","tx2.jpg"));
        playerList.add(PlayerUtils.getPlayer("王五","tx3.jpg"));
        playerList.add(PlayerUtils.getPlayer("钱大","tx4.jpg"));
        return playerList;
    }

}
